<template>
	<view class="mainpadding beijingse">
		<view class="ffffff mainpadding radius">
			<view class="sanshier xiaohei fonweight">请输入您想绑定的副帐号</view>
			<view class="flexbetween xiahuaxian margin_top5">
				<input type="number" placeholder="请输入手机号" style="width: 300rpx;" v-model="mobile">
				<view class="flexright" @click="tzqhbdfs">
					<!-- <view class="strongtext xiaohei nofonweight margin_right">已注册</view> -->
					<!-- <view class="hubnt flexcenter">切换绑定方式</view> -->
				</view>
			</view>
			<view class="strongtext xiaohui nofonweight margin_top">输入您想绑定的副卡，副卡将享有和您一样的权限</view>
		</view>
		<view class="bighbtn margin_top6" @click="submit">确定</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				mobile:""
			}
		},
		methods: {
			submit(){
				uni.showLoading({
					title:"请稍后",
					mask:true,
				})
				if(this.mobile==""){
					httpRequest.toast("请输入手机号")
					return false
				}
				let data = {
					mobile:this.mobile
				}
				httpRequest.request('/api/user/bindFcard', 'POST', data).then(res => {
					uni.hideLoading()
					httpRequest.toast(res.msg)
					if(res.code==1){
						setTimeout(() => {
							uni.navigateBack({
								delta:1
							})
						}, 1000)
					}
					
				})
			},
			// 跳转切换绑定方式
			tzqhbdfs(){
				uni.navigateTo({
					url:'/pages_mine/qiehuanbdfs'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.hubnt{
	width: 210rpx;
	height: 60rpx;
	border-radius: 39rpx 39rpx 39rpx 39rpx;
	font-size: 28rpx;
	font-weight: 400;
	color: #EE6D2D;
	border: 1rpx solid #EE6D2D;
}
</style>
